home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sprite 1984 - 1993
/
Sprite 1984 - 1993.iso
/
src
/
lib
/
c
/
time
/
RCS
/
Time_GetTime.c,v
< prev
next >
Wrap
Text File
|
1991-04-22
|
2KB
|
77 lines
head 1.1;
branch ;
access ;
symbols ;
locks ; strict;
comment @ * @;
1.1
date 91.04.21.22.43.56; author kupfer; state Exp;
branches ;
next ;
desc
@Time_GetTime library routine.
@
1.1
log
@Initial revision
@
text
@/*
* Time_GetTime.c --
*
* Time_GetTime library routine.
*
* Copyright 1991 Regents of the University of California
* Permission to use, copy, modify, and distribute this
* software and its documentation for any purpose and without
* fee is hereby granted, provided that this copyright
* notice appears in all copies. The University of California
* makes no representations about the suitability of this
* software for any purpose. It is provided "as is" without
* express or implied warranty.
*/
#ifndef lint
static char rcsid[] = "$Header: /sprite/lib/forms/RCS/proto.c,v 1.5 91/02/09 13:24:44 ouster Exp $ SPRITE (Berkeley)";
#endif /* not lint */
#include <spriteTime.h>
#include <sys/time.h>
/*
*----------------------------------------------------------------------
*
* Time_GetTime --
*
* Return the current time of day. This is like gettimeofday(),
* but it's defined for use with Time objects.
*
* Results:
* Returns the current time of day through resultPtr..
*
* Side effects:
* None.
*
*----------------------------------------------------------------------
*/
void
Time_GetTime(resultPtr)
Time *resultPtr;
{
struct timeval nowUnix;
(void)gettimeofday(&nowUnix, (struct timezone *)0);
resultPtr->seconds = nowUnix.tv_sec;
resultPtr->microseconds = nowUnix.tv_usec;
}
@